package com.zenithmind.library;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.transaction.annotation.EnableTransactionManagement;

/**
 * ZenithMind 图书管理系统服务启动类
 * 
 * @author ZenithMind
 * @since 2024-06-14
 */
@SpringBootApplication
@EnableDiscoveryClient
@EnableCaching
@EnableAsync
@EnableScheduling
@EnableTransactionManagement
@MapperScan("com.zenithmind.library.mapper")
@ComponentScan(basePackages = {"com.zenithmind.library", "com.zenithmind.common"})
public class LibraryServiceApplication {

    public static void main(String[] args) {
        SpringApplication.run(LibraryServiceApplication.class, args);
        System.out.println("=================================");
        System.out.println("📚 ZenithMind 图书管理系统服务启动成功！");
        System.out.println("📖 API文档地址: http://localhost:8086/doc.html");
        System.out.println("🔍 健康检查: http://localhost:8086/actuator/health");
        System.out.println("=================================");
    }
}
